<?php
	/**
	* @package ParkFind
	* @desc This is the register page. 
	*/
	/**
	* @desc This include file will load the directory settings for the Smarty Templates
	*/
	session_start();
	
	//Smarty
	require 'includes/smarty.inc';
	$smarty->assign('title', "Registered");
	$smarty->assign('user_id', $_SESSION["user_id"]);	
	$smarty->assign('last', $_SESSION["lastviewed"]);	
	$smarty->assign('firstname', $_SESSION["firstname"]);
	$smarty->assign('role', $_SESSION["role"]);
	$smarty->assign('top5', $_SESSION["top5"]);	
	$smarty->display('header.tpl');	

	if (isset($_SESSION["form"]["first"]))
		$smarty->assign('first', $_SESSION["form"]["first"]);

	if (isset($_SESSION["errors"]["first"]))
		$smarty->assign('firsterr',	$_SESSION["errors"]["first"]);

	if (isset($_SESSION["form"]["last"]))
		$smarty->assign('last', $_SESSION["form"]["last"]);

	if (isset($_SESSION["errors"]["last"]))
		$smarty->assign('lasterr', $_SESSION["errors"]["last"]);
	
	if (isset($_SESSION["form"]["email"]))
		$smarty->assign('email', $_SESSION["form"]["email"]);

	if (isset($_SESSION["errors"]["email"]))
		$smarty->assign('emailerr', $_SESSION["errors"]["email"]);

	if (isset($_SESSION["errors"]["pass1"]))
		$smarty->assign('pass1err', $_SESSION["errors"]["pass1"]);

	if (isset($_SESSION["errors"]["pass2"]))
		$smarty->assign('pass2err', $_SESSION["errors"]["pass2"]);

	$smarty->display('register.tpl');
				
	unset($_SESSION["errors"]);
	unset($_SESSION["form"]);
	$smarty->display('footer.tpl');
?>
